package com.oj.api.core.domain;

import com.oj.api.core.constants.JudgeConstant;
import com.oj.common.domain.BaseInfo;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * 评测行对象
 * Created by Bing on 2018/5/6.
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class JudgeLineInfo extends BaseInfo{

    /**
     * 提示
     */
    protected String remark;

    /**
     * 得分
     */
    protected Integer score;


    /**
     * 运行时间，运行内存
     */
    protected Long runTime,runMemory;

    public String getStatusName(){
        for(JudgeConstant jc:JudgeConstant.values()){
            if(jc.getValue().equals(this.status)){
                return jc.getText();
            }
        }
        return null;
    }
}
